using NUnit.Framework;

namespace projectfile.tests
{
    [TestFixture]
    public class DefaultNamespaceTests
    {
        private DefaultNamespace sut;
        private string result;

        [SetUp]
        public void Setup() {
            sut = new DefaultNamespace(new ProjectReader(), new ParseDefaultNamespace());
            sut.Result += x => result = x;
        }

        [Test]
        public void Default_Namespace_will_be_extracted() {
            const string filename = @"..\..\projectfile.tests.csproj";
            sut.Process(filename);
            Assert.That(result, Is.EqualTo("projectfile.tests"));
        }
    }
}